Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check the global variable GLOBAL_METADATA_TRIE_DATA_SIZE #483

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

LindaGuiga
Copy link
Contributor

Closes #473 .

This PR checks that the value stored in GLOBAL_METADATA_TRIE_DARA_SIZE after hashing the initial state trie is correct. Given that the initial trie is hashed and checked against the actual input hash, and that the final hash is constructed based on the initial trie, this should be enough to ensure soundness.

Note that when "guessing" the initial state trie, we do not store the storage values in the trie anymore: the value is added (and the pointer overwritten) anyway in mpt_set_payload.

@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label Aug 9, 2024
@Nashtare Nashtare changed the title Check the global variable GLOBAL_METADATA_TRIE_DARA_SIZE Check the global variable GLOBAL_METADATA_TRIE_DATA_SIZE Aug 10, 2024
@Nashtare Nashtare added this to the continuations - Q3 2024 milestone Aug 10, 2024
Copy link
Collaborator

@Nashtare Nashtare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just minor nits.

evm_arithmetization/src/cpu/kernel/asm/main.asm Outdated Show resolved Hide resolved
evm_arithmetization/src/cpu/kernel/asm/main.asm Outdated Show resolved Hide resolved
evm_arithmetization/src/generation/mpt.rs Outdated Show resolved Hide resolved
@Nashtare Nashtare merged commit f47590f into feat/continuations Aug 14, 2024
13 of 14 checks passed
@Nashtare Nashtare deleted the check-trie-data-size branch August 14, 2024 16:51
Nashtare pushed a commit that referenced this pull request Aug 15, 2024
* Check trie data length

* Change order of checks and improve comments

* Apply comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants